package com.demo.array;
/*
多个数组指向相同内存
 */
public class Test07 {
    public static void main(String[] args) {
        int[]arr=new int[3];
        int[]arr2 = arr;
        System.out.println(arr[0]);
        System.out.println(arr[1]);
        System.out.println(arr[2]);
        System.out.println(arr);//[I@10f87f48
        System.out.println(arr2[0]);
        System.out.println(arr2[1]);
        System.out.println(arr2[2]);
        System.out.println(arr2);//[I@10f87f48
        arr[0]=11;
        arr[1]=22;
        System.out.println(arr2[0]);// 11
        System.out.println(arr2[1]);// 22
        arr2[0]=33;
        arr2[1]=55;
        System.out.println(arr[0]);//  33
        System.out.println(arr[1]);//   55
    }
}
